<#include "../header.ftl">
<html>

<body>

<#include "../nav-top.ftl">
<div class="sui-container" style="margin-top: 30px;">
    <ul class="sui-breadcrumb" style="padding: 0px 0px">
        <li><a href="#">账号群组管理</a></li>
        <li><a href="#">群组管理</a></li>
        <li class="active">新增群组</li>
    </ul>
    <form id="form-group" class="sui-form form-horizontal" novalidate="novalidate">
    <div class="sui-row-fluid">
        <div class="span12">
                <div class="control-group">
                    <label for="groupName">群组名称：</label>
                    <div class="controls">
                        <input type="text" id="groupName" name="groupName" placeholder="群组名称" data-rules="required">
                    </div>
                    &nbsp;&nbsp;
                    <label for="groupLevel">群组级别：</label>
                    <div class="controls">
                    <#--<input type="text" id="inputEmail" name="email" placeholder="群组名称" data-rules="required">-->
                        <select class="input-large" id="groupLevel">
                        <#list groupLevel as level>
                            <option value="${level.codeValue}">${level.codeName}</option>
                        </#list>
                        </select>
                    </div>
                    &nbsp;&nbsp;
                    <label for="groupType">群组分类：</label>
                    <div class="controls">
                        <select class="input-large" id="groupType">
                        <#list groupType as type>
                            <option value="${type.codeValue}">${type.codeName}</option>
                        </#list>
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label for="groupRemark">备　　注：</label>
                    <div class="controls">
                        <textarea rows="3" class="input-xxlarge " id="groupRemark" maxlength="100"></textarea>
                    </div>
                </div>


        </div>
    </div>
    <div class="sui-row-fluid" style="margin-top: 20px;">
        <div class="span3">
            <button type="submit" class="sui-btn btn-xlarge btn-primary create-group" data-id="">创建</button>
            <a href="/group" class="sui-btn btn-xlarge btn-info">返回</a>
        </div>
    </div>
    </form>
</div>
<div class="sui-container grid-demo" style="margin-top: 30px;">
    <div class="sui-row-fluid">
        <div class="span12">
            <ul class="sui-nav nav-tabs nav-xlarge nav-primary">
                <li class="active"><a href="#channel" data-toggle="tab">渠道</a></li>
                <li><a href="#user" data-toggle="tab">账号</a></li>
            </ul>
            <div class="tab-content">
                <div id="channel" class="tab-pane active">
                    <form id="form-channel" class="sui-form form-horizontal" novalidate="novalidate">
                        <div class="control-group">
                            <label for="channelId">渠道ID：</label>
                            <div class="controls">
                                <input type="text" id="channelId" name="channelId" placeholder="道ID"
                                       data-rules="required">
                            </div>
                            &nbsp;&nbsp;
                            <label for="channelName">渠道名称：</label>
                            <div class="controls">
                                <input type="text" id="channelName" name="channelName" placeholder="渠道名称"
                                       data-rules="required">
                            </div>
                            &nbsp;&nbsp;
                            <a href="javascript:void(0);" class="sui-btn btn-large query-channel">查询</a>&nbsp;
                            <button class="sui-btn btn-large add-channel" disabled="disabled" type="button">添加</button>
                        </div>
                    </form>
                    <table class="sui-table table-bordered rowover-table" id="tab-channel">
                        <thead>
                        <tr>
                            <th><input type="checkbox" class="check-add-channel"/></th>
                            <th>渠道ID</th>
                            <th>渠道名称</th>
                            <th>创建日期</th>
                            <th>平台类型</th>
                            <th>备注</th>
                        </tr>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
                    <div class="sui-pagination pagination-large channel-pagination" style="float: right">
                        <ul>
                            <li class="prev disabled"><a href="#">«上一页</a></li>
                            <li class="next"><a href="#">下一页»</a></li>
                        </ul>
                    </div>
                </div>
                <div id="user" class="tab-pane">
                    <form id="form-user" class="sui-form form-horizontal" novalidate="novalidate">
                        <div class="control-group">
                            <label for="inputEmail">账号名称：</label>
                            <div class="controls">
                                <input type="text" id="inputEmail" name="email" placeholder="账号名称"
                                       data-rules="required">
                            </div>
                            &nbsp;&nbsp;
                            <a href="javascript:void(0);" class="sui-btn btn-large query-user">查询</a>&nbsp;
                            <button type="button" class="sui-btn btn-large add-user" disabled="disabled">添加</button>
                        </div>
                    </form>
                    <table class="sui-table table-bordered  rowover-table" id="tab-user">
                        <thead>
                        <tr>
                            <th><input type="checkbox" class="check-add-user"/></th>
                            <th>账号名称</th>
                            <th>创建日期</th>
                            <th>备注</th>
                        </tr>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
                    <div class="sui-pagination pagination-large user-pagination" style="float: right">
                        <ul>
                            <li class="prev disabled"><a href="#">«上一页</a></li>
                            <li class="next"><a href="#">下一页»</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<#include "../footer.ftl">
<script src="../../static/js/plugins/sea/sea.js"></script>
<script src="../../static/js/sea.config.js"></script>
<script>
    seajs.use('/static/js/game/group/add');
</script>
<script id="tp-user" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var user = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="group-user-id" value="<%= user.uid %>"/></td>
        <td><%= user.accountName %></td>
        <td><%= user.nickName %></td>
        <td><%= dateFormat(user.createTime,'yyyy-MM-dd') %></td>
    </tr>
    <% } %>
</script>

<script id="tp-channel" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var channel = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="channel-id" value="<%= channel.channelId %>"/></td>
        <td><%= channel.channelId %></td>
        <td><%= channel.channelName %></td>
        <td><%= dateFormat(channel.createTime,'yyyy-MM-dd') %></td>
        <td><%= channel.plateformType %></td>
        <td><%= channel.channelRemark %></td>
    </tr>
    <% } %>
</script>
</body>
</html>
